/**
 * 提示条对象
 */
MPT.addObject('Tip', function() {
    var tip_jQ;
    var progress_id;

    this.hide = function() {
        tip_jQ.fadeOut("fast", function() { tip_jQ.hide(); });
    }

    // 显示现有内容层
    this.show = function(_text) {

        if (progress_id) clearTimeout(progress_id);

        tip_jQ = $('#tip');
        tip_jQ.html(_text);
        var left = ($(window).width() - tip_jQ.width()) / 2;
        var top = ($(window).height() - tip_jQ.height()) / 2 + $(window).scrollTop();
        top = (top > 0 ? top : 0);
        tip_jQ.css({ "left": left, "top": top }).show();

        progress_id = setTimeout("Tip.hide()", 2000);
    };
});
